import { UNMOUNTING, NOT_MOUNTED, MOUNTED } from "../applications/app.helpers";
export async function toUnmountPromise(app) {
    // 当前应用没有被挂在，啥都不做
    if (app.status != MOUNTED) {
        return app;
    }
    app.status = UNMOUNTING;

    await app.unmount(app.customprops); // 调用unmount钩子

    app.status = NOT_MOUNTED;
    
    return app;
}